<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
 	 <%@ include file="/common/import.jsp"%>
    
	<script type="text/javascript">
	//查询
	function searchList() {
		var memEname = $.trim($("#memberEname").val());
		$('#memberList').datagrid({
			title:'符合条件的会员列表',
			//iconCls:'icon-ok',
			url:'${ctx}/admin/member/checkMemberRepeated.action?memberEname='+memEname,
			nowrap: false,
			striped: true,
			collapsible:false,				
			fitColumns: true,
			
			singleSelect:true,
			rownumbers:true,
			remoteSort: false,
			idField:'memberId',
			columns:[[
			<%-- {field:'memberId',title:'会员编号',width:200,sortable:true},--%>
				{field:'memberEname',title:'会员账号',width:100,sortable:true},
				{field:'memberCname',title:'会员全称',width:60,sortable:true}
			]],
			onLoadSuccess:function(data){
				if(data.rows.length==0){
					var body = $(this).data().datagrid.dc.body2;
					body.find('table tbody').append('<tr><td width="'+body.width()+'" style="height: 25px; text-align: center;" colspan="6">没有符合条件的数据</td></tr>');
				}
			}
		});	
		
	}
	
	//清除查询
	function clearSearch() {
		$('#memberEname').val('');
	}
	</script>

  </head>
  <body>
  <h2>会员重复判断</h2>

	<div id="tab_search">

		<table class="datagrid-body" width="100%">
			<tr>
				<%--
				<td class="datagrid-header">会员编号</td>
				<td><input type="text" id="memberId" name="memberId" />
				</td>
				--%>
				<td class="datagrid-header">会员账号</td>
				<td><input type="text" id="memberEname" name="memberEname" />
				</td>

			</tr>
			<tr>
				<td colspan="8" align="center"><a class="easyui-linkbutton"
					iconCls="icon-search" onclick="searchList()">查 询</a>

					&nbsp;&nbsp;&nbsp; <a class="easyui-linkbutton" iconCls="icon-redo"
					href="javascript:void(0)" onclick="clearSearch();">清空</a>
				</td>
			</tr>
		</table>

	</div>
	
	<table id="memberList"></table>
  </body>
</html>
